package com.tangruojie.config;

import org.springframework.context.annotation.ComponentScan;
import org.springframework.context.annotation.Configuration;
import org.springframework.context.annotation.FilterType;
import org.springframework.stereotype.Controller;

@Configuration
@ComponentScan({"com.tangruojie.dao", "com.tangruojie.service"})
/**
 * 扫描指定包下的所有类，除了Controller类
 * 扫描config包下的所有类，虽然已经排除Controller类，但是SpringMvcConfig类本身扫描Controller类，Controller类还是会被扫描到
 */
//@ComponentScan(value = "com.tangruojie",
//        excludeFilters = @ComponentScan.Filter(
//                type = FilterType.ANNOTATION,
//                classes = Controller.class
//        )
//)
public class SpringConfig {
}
